<template>
  <span>
    <img :style="styles" :src="now_icon"/>&nbsp;&nbsp;
  </span>
</template>

<script>
import imgs from './imgs'
export default {
  name: 'Icons',
  props: {
    type: {
      type: String,
      required: true
    },
    color: {
      type: String,
      default: '#5c6b77'
    },
    size: {
      type: Number,
      default: 16
    }
  },
  computed: {
    now_icon () {
      const type = this.type
      if (!this.menuCollapsed) {
        if (type === '_custom_order_manager') {
          return imgs.OrderManagerIcon
        }
        if (type === '_custom_member_center') {
          return imgs.MemberCenterIcon
        }
        if (type === '_custom_member_manager') {
          return imgs.MemberManagerIcon
        }
      } else {
        if (type === '_custom_order_manager') {
          return imgs.OrderManagerCheckIcon
        }
        if (type === '_custom_member_center') {
          return imgs.MemberCenterCheckIcon
        }
        if (type === '_custom_member_manager') {
          return imgs.MemberManagerCheckIcon
        }
      }
    },
    styles () {
      return {
        width: '1wpx',
        height: '12px'
      }
    }
  }
}
</script>

<style>

</style>
